cmake_minimum_required(VERSION 3.2)
project(signTowards)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread -g -O0")

set(WONDERFUL_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/../sample/linux")
set(ONBOARDSDK_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/../osdk-core")
include_directories(${ONBOARDSDK_SOURCE}/api/inc)
include_directories(${ONBOARDSDK_SOURCE}/utility/inc)
include_directories(${ONBOARDSDK_SOURCE}/hal/inc)
include_directories(${ONBOARDSDK_SOURCE}/protocol/inc)
include_directories(${ONBOARDSDK_SOURCE}/platform/linux/inc)
include_directories(${ONBOARDSDK_SOURCE}/common)


include_directories(${WONDERFUL_SOURCE}/flighttest)

find_package(OpenCV REQUIRED)

FILE(GLOB SOURCE_FILES *.hpp *.cpp
        ${ONBOARDSDK_SOURCE}/common/dji_linux_environment.cpp
        ${ONBOARDSDK_SOURCE}/common/dji_linux_helpers.cpp
        )
add_executable(${PROJECT_NAME} ${SOURCE_FILES})

target_link_libraries(${PROJECT_NAME} djiosdk-core)
# just add the library you want!fligh-control在sample/linux/flightest
target_link_libraries(${PROJECT_NAME} flight-control ${OpenCV_LIBS})